import axios from 'axios';
import {API_NEW_VERSION} from '../api';

const FUNDMEBACCT_INFO_FEE_COUNT = API_NEW_VERSION + 'fundmebacct/info/fee/count';
const FUNDMEBACCT_INFOFEEMSG_BY_USERID = API_NEW_VERSION + 'fundmebacct/infofeemsg/by/userid';
const FUNDMEBACCT_FOR_INFOFEE = API_NEW_VERSION + 'fundmebacct/for/infofee';
const FUNDMEBACCT_PROFIT_OUT_FLOW = API_NEW_VERSION + 'fundmebacctprofitoutflow';
const FUNDMEBACCTPROFITOUTFLOW_LIST = API_NEW_VERSION + 'fundmebacctprofitoutflow/list';

export const searchInfoFeeCount = (param) => {
  return axios.get(FUNDMEBACCT_INFO_FEE_COUNT, {params: param});
};

export const searchInfoFeeMsgByUserId = (userId) => {
  return axios.get(FUNDMEBACCT_INFOFEEMSG_BY_USERID, {params: {userId: userId}});
};

export const sumFundMebacctForInfoFee = (realName, phone) => {
  return axios.get(FUNDMEBACCT_FOR_INFOFEE, {params: {realName: realName, phone: phone}});
};

export const createFundMebacctProfitOutflow = (params) => {
  return axios.post(FUNDMEBACCT_PROFIT_OUT_FLOW, params);
};

export const searchFundMebacctProfitOutflowByUserId = (params) => {
  return axios.get(FUNDMEBACCTPROFITOUTFLOW_LIST, {params: params});
};
